import Cookies from 'js-cookie';

const TokenKey = 'token';

/**
 * 获取token
 */
export function getToken(): string {
  return Cookies.get(TokenKey);
}

/**
 * 设置token
 * @param {string} token token值
 */
export function setToken(token: string): void {
  return Cookies.set(TokenKey, token);
}

/**
 * 删除token
 */
export function removeToken(): void {
  return Cookies.remove(TokenKey);
}
